package org.csu.question.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import org.aspectj.weaver.patterns.TypePatternQuestions;

import java.time.LocalDateTime;
import java.util.List;

// 知识点实体
@Data
@TableName("knowledge_points")
public class KnowledgePoint {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("name")
    private String name;

    @TableField("description")
    private String description;

    @TableField("tag")
    private String tag; // 标签

    @TableField("parent_id")
    private Long parentId; // 父知识点ID，支持层级结构

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    // 非数据库字段
    @TableField(exist = false)
    private List<Questions> questions;
}
